package com.service.impl;

import com.model.User;
import com.service.UserService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class UserServiceImpl  implements UserService {
    private static Map<String, User> userMap = new HashMap<>();
    static {
        User user = new User();
        user.setName("luobiao");
        user.setAge(28);
        userMap.put("1", user);
    }

    @Override
    public User findUserById(String id) {
        return userMap.get(id);
    }
}
